package ma.controller.gui;

import ma.controller.panels.CtrCenterTabbedPane;
import ma.controller.panels.auxillary.CtrInformationPanel;
import ma.model.EBenchmark;
import ma.view.gui.MainFrame;

/**
 * The {@code MainFrameController} controls and creates the main frame of this
 * {@code JFrame} application.
 * @author Oliver Eckstein
 *
 */
public class MainFrameController {
    
    private CtrCenterTabbedPane tabbedPaneController;
    private CtrInformationPanel infoPanelController =
            new CtrInformationPanel();    
    EBenchmark eBenchmark = new EBenchmark();
    
    /**
     * Creates a new instance of a {@code MainFrameController}.
     */
    public MainFrameController() {                
        createMainFrame();
    }
    
    /**
     * Creates the main frame.
     */
    private void createMainFrame() {        
        tabbedPaneController =
                new CtrCenterTabbedPane(eBenchmark, infoPanelController);
        new MainFrame(tabbedPaneController.getView(),
                infoPanelController.getView());
    }    
}
